﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EnterpriseLibraryWrapper
{
    public class EnterpriseLibraryFactory
    {
        static LoggerWrapper logger = new LoggerWrapper();
        static DataAccessWrapper data = new DataAccessWrapper();
        static ExceptionHandlerWrapper exception = new ExceptionHandlerWrapper();

        public static ILoggerWrapper GetLogger()
        {
            return new LoggerWrapper();
        }

        public static IDataAccessWrapper GetDataAccess()
        {
            return new DataAccessWrapper();
        }

        public static IDataAccessWrapper GetDataAccess(string ambiente)
        {
            IDataAccessWrapper data = GetDataAccess();
            data.Ambiente = System.Configuration.ConfigurationManager.AppSettings[ambiente];
            return data;
        }

        public static IExceptionHandlerWrapper GetExceptionHandler()
        {
            return new ExceptionHandlerWrapper();
        }
    }
}
